feat: Add support for rolling back to snapshot#2878
Merged
kevinjqliu merged 1 commit intoapache:mainfrom Jan 15, 2026
Merged
Conversation
jayceslesar
reviewed
Jan 3, 2026
| """ | ||
| self._commit_if_ref_updates_exist() | ||
|
|
||
| if (snapshot_id is None) == (ref_name is None): |
Contributor
There was a problem hiding this comment.
this is a silly nit but why do this? This looks almost java-esque and could be
Suggested change
| if (snapshot_id is None) == (ref_name is None): | |
| if snapshot_id is None and ref_name is None: |
Contributor
Author
There was a problem hiding this comment.
Yeah lol I just cleaned up the original in a pythonish way to say one must be set. However, seems like this is confusing
Contributor
There was a problem hiding this comment.
you could probably do some fanciness with any and all but not gonna harp on it
kevinjqliu
approved these changes
Jan 13, 2026
Contributor
kevinjqliu
left a comment
There was a problem hiding this comment.
LGTM!
I think it would be good to include some of the mocked test cases in tests/integration/test_snapshot_operations.py on actual tables. Mock tests can only do so much 😞
kevinjqliu
approved these changes
Jan 15, 2026
Contributor
kevinjqliu
left a comment
There was a problem hiding this comment.
LGTM Thanks for adding the tests!
Contributor
|
Thanks for the PR @geruh and thanks for the review @jayceslesar |
kevinjqliu
pushed a commit
that referenced
this pull request
Jan 22, 2026
# Rationale for this change This PR adds the ability to rollback a table to a ancestoral snapshot given a timestamp. Some of this work was also done in #758, and is a progress pr to be merged after #2871 & #2878. This is standalone from the other changes but it makes use of the helpers in the other prs. Additionally, adding some more tests. ## Are these changes tested? Yes ## Are there any user-facing changes? New API for meta --------- Co-authored-by: Chinmay Bhat <12948588+chinmay-bhat@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
This PR adds the ability to rollback a table to a ancestoral snapshot. Some of this work was also done in #758, and is a progress pr to be merged after #2871.
Additionally, adding some more tests.
Are these changes tested?
Yes
Are there any user-facing changes?
New API